package com.zephyr.vchcenter.bpm.action;

import org.apache.log4j.Logger;

import com.hiaward.bpm.action.TaskAction;
import com.hiaward.bpm.context.ServiceContext;
import com.hiaward.bpm.exception.ParameterException;
import com.hiaward.bpm.exception.ServiceException;
import com.zephyr.vchcenter.bean.Voucher;
import com.zephyr.vchcenter.dao.IBaseDao;
import com.zephyr.vchcenter.helper.SpringHelper;

public class LocalScanAuditAction extends TaskAction {
	private final Logger log=Logger.getLogger(LocalScanAuditAction.class);
	@Override
	public void perform(ServiceContext context) throws ServiceException,
			ParameterException {
		log.debug("进入LocalScanAuditAction.............");
		String vchsid=(String)context.getInputParameterValue("vchsid");
		String idresult=(String)context.getInputParameterValue("idresult");
		//String identifyExp = (String)arg0.getInputParameterValue("identifyExp");
		String idstate=(String)context.getInputParameterValue("idstate");
        IBaseDao dao=(IBaseDao)SpringHelper.getBean("baseDao");
        Voucher voucher=(Voucher)dao.findById("Voucher", vchsid);
        voucher.setIdresult(idresult);
        voucher.setIdstate(idstate);
	    dao.saveOrUpdate(voucher);
		log.debug("�liakiLocalScanAuditAction离开LocalScanAuditAction............");
	}

	@Override
	public void serviceExceptionHandle(ServiceContext arg0,
			ServiceException arg1) {
		
	}

}
